Optimal. Leaf size=173 \[ \frac {\log \left (\frac {2 f x}{e-\sqrt {e^2-4 d f}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (\frac {2 f x}{\sqrt {e^2-4 d f}+e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}}+\frac {b n \text {Li}_2\left (-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2357, 2317, 2391} \[ \frac {b n \text {PolyLog}\left (2,-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {PolyLog}\left (2,-\frac {2 f x}{\sqrt {e^2-4 d f}+e}\right )}{\sqrt {e^2-4 d f}}+\frac {\log \left (\frac {2 f x}{e-\sqrt {e^2-4 d f}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (\frac {2 f x}{\sqrt {e^2-4 d f}+e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2357
Rule 2391
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{d+e x+f x^2} \, dx &=\int \left (\frac {2 f \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f} \left (e-\sqrt {e^2-4 d f}+2 f x\right )}-\frac {2 f \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f} \left (e+\sqrt {e^2-4 d f}+2 f x\right )}\right ) \, dx\\ &=\frac {(2 f) \int \frac {a+b \log \left (c x^n\right )}{e-\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}-\frac {(2 f) \int \frac {a+b \log \left (c x^n\right )}{e+\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {(b n) \int \frac {\log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{x} \, dx}{\sqrt {e^2-4 d f}}+\frac {(b n) \int \frac {\log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}+\frac {b n \text {Li}_2\left (-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 157, normalized size = 0.91 \[ \frac {\left (\log \left (\frac {-\sqrt {e^2-4 d f}+e+2 f x}{e-\sqrt {e^2-4 d f}}\right )-\log \left (\frac {\sqrt {e^2-4 d f}+e+2 f x}{\sqrt {e^2-4 d f}+e}\right )\right ) \left (a+b \log \left (c x^n\right )\right )+b n \text {Li}_2\left (\frac {2 f x}{\sqrt {e^2-4 d f}-e}\right )-b n \text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.66, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b \log \left (c x^{n}\right ) + a}{f x^{2} + e x + d}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b \log \left (c x^{n}\right ) + a}{f x^{2} + e x + d}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.22, size = 555, normalized size = 3.21 \[ -\frac {i \pi b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {i \pi b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}+\frac {i \pi b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}-\frac {i \pi b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{\sqrt {4 d f -e^{2}}}-\frac {2 b n \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \relax (x )}{\sqrt {4 d f -e^{2}}}+\frac {b n \ln \relax (x ) \ln \left (\frac {-2 f x -e +\sqrt {-4 d f +e^{2}}}{-e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}-\frac {b n \ln \relax (x ) \ln \left (\frac {2 f x +e +\sqrt {-4 d f +e^{2}}}{e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}+\frac {b n \dilog \left (\frac {-2 f x -e +\sqrt {-4 d f +e^{2}}}{-e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}-\frac {b n \dilog \left (\frac {2 f x +e +\sqrt {-4 d f +e^{2}}}{e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}+\frac {2 b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \relax (c )}{\sqrt {4 d f -e^{2}}}+\frac {2 b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \left (x^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {2 a \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right )}{\sqrt {4 d f -e^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {a+b\,\ln \left (c\,x^n\right )}{f\,x^2+e\,x+d} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \log {\left (c x^{n} \right )}}{d + e x + f x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________